package org.gpp.proj1.robot.part.parser;

/**
 * Exception that is thrown by the PartFileParser when loading
 * part files with invalid or missing fields
 * 
 * @author Paolo Victor, paolovictor@gmail.com
 */
public class InvalidPartFileException extends Exception {

	private static final long serialVersionUID = 1L;
	
	private String invalidField;

	public InvalidPartFileException( String invalidField ) {
		this.invalidField = invalidField;
	}
	
	public String getInvalidField() {
		return invalidField;
	}
	
	@Override
	public String getMessage() {
		return "The field " + invalidField + " is invalid or missing.";
	}
}
